Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible translation keys for logbook binary sensors #22257

Conversation

karwosts
Copy link
Contributor

@karwosts karwosts commented Oct 6, 2024

Proposed change

Allow more flexibility for translators to customize strings for logbook messages for individual device classes. Right now the mapping between classes and shared translated strings are fixed in code, so translators cannot customize messages for individual classes.

Remove the hardcoding in the code and push the string reuse to lokalize key references, so it can be overridden as needed.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

This comment was marked as off-topic.

@MindFreeze MindFreeze merged commit df3e457 into home-assistant:dev Nov 6, 2024
17 checks passed
piitaya added a commit that referenced this pull request Nov 6, 2024
piitaya added a commit that referenced this pull request Nov 6, 2024
…22687)

Revert "More flexible translation keys for logbook binary sensors (#22257)"

This reverts commit df3e457.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"detected" and "cleared" log entries need per device type variants
2 participants